<!-- 留言板：index.php -->
<html>
<body>
<?php
echo "<center><h1><font color=red>欢迎来到留言板:</font></h1></center>";
require_once("common.php");
if( isset($_POST['ok']) ){
    
 
   $name= $_POST['name'];
   $message=$_POST['message'];
	$query="INSERT INTO message (`name`,`message`) values ('$name','$message')";
	$DB->query($query);
	
   echo '插入成功';
	
}
?>

<!--网页配置选项--> 
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>我的book</title>
 </head>
 <body>

	<form action="index.php" method="post">
	name:<input type="message" name="name">
	message:<input type="message" name="message">
	<input type="hidden" name="ok" value='yes'>
	<input type="submit" value="提交">
	</form>
	</body>
	</html>


